<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>订单管理</title>
    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/Plugin/style/css/ace.min.css" rel="stylesheet">
    <script language="javascript" type="text/javascript" src="__PUBLIC__/My97DatePicker/WdatePicker.js"></script>
    <script language="javascript" type="text/javascript" src="__PUBLIC__/order.js"></script>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>订单管理</h5>

                    <div class="ibox-content">
                        <form method="post" action="__CONTROLLER__/index"class="form-horizontal" enctype="multipart/form-data">
                            <div class="form-group">
                                <button id="btn" class="btn btn-white" type="submit">搜索</button>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$order_no}" name="order_no" id="order_no" placeholder="请输入订单号">
                                </div>
                                <div class="col-sm-2">
                                    <select class="form-control" name="orderStatus" size="1">
                                        <option value="-1" <if condition="$orderStatus eq -1"> selected</if>>全部</option>
                                        <option value="2"<if condition="$orderStatus eq 2"> selected</if>>已付款</option>
                                        <option value="1" <if condition="$orderStatus eq 1"> selected</if>>待付款</option>
                                    </select>
                                </div>
                                <div class="col-sm-2">
                                    <input class="form-control" name="start_time" id="startDate" class="Wdate" type="date" onclick="startDateClick()" value="{$start_time}"/>
                                </div>

                                <div class="col-sm-2">
                                    <input class="form-control" name="end_time" id="endDate" class="Wdate" type="date" onclick="endDateClick()" value="{$end_time}"/>
                                </div>

                            </div>
                        </form>

                        <div class="ibox-content">
                            <div class="col-sm-2">
                                订单总数:<span style="color: red;padding: 20px">{$result_result.count}</span>单
                            </div>
                            <div class="col-sm-2">
                                订单总金额:<span style="color: red;padding: 20px">{$result_result.order_price}</span>元
                            </div>
                        </div>

                        <div class="ibox-content">
                            <table class="table table-striped table-bordered table-hover dataTables-example">
                                <thead>
                                <tr>
                                    <th>订单号</th>
                                    <th>店铺名称</th>
                                    <th>用餐人数</th>
                                    <th>用餐桌号</th>
                                    <th>订单总价</th>
                                    <th>订单备注</th>
                                    <th>订单状态</th>
                                    <th>付款金额</th>
                                    <th>付款时间</th>
                                    <th>付款方式</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="result" id="result">
                                    <tr>
                                        <td>{$result.order_no}</td>
                                        <td>{$result.store_name}</td>
                                        <td>{$result.people_number}</td>
                                        <td>{$result.desk_number}</td>
                                        <td>{$result.order_price}</td>
                                        <td>{$result.remark}</td>
                                        <td>{$result.fromart_state}</td>
                                        <td>{$result.total_price}</td>
                                        <td>{$result.pay_time}</td>
                                        <td>{$result.fromart_method}</td>
                                        <td>
                                            <a title="编辑" href="{:U('Admin/order/edit',array('id'=>$result['order_no']))}"><i class="glyphicon glyphicon-pencil" style="margin-right: 10px;"></i></a>
                                            <a title="删除" href="{:U('Admin/order/del',array('id'=>$result['order_no']))}" ><i class="glyphicon glyphicon-remove"></i></a>
                                        </td>
                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </div>
                        <div class="pagination" style="margin:0px;">
                            {$page}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
    <script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
    <script src="__PUBLIC__/Theme1/js/plugins/iCheck/icheck.min.js"></script>
    <script>
        $(document).ready(function () {
            $(".i-checks").iCheck({checkboxClass: "icheckbox_square-green", radioClass: "iradio_square-green",})
        });
    </script>
</body>
</html>
